package org.example;

public enum HandFeeCalculator {
 
    // 端游
    PC {
        public double count(double amount) {
            return amount * 5 / 100;
        }
    },
    // 页游
    PAGE {
        public double count(double amount) {
            return amount * 2 / 100;
        }
    },
    // 手游
    MOBILE {
        public double count(double amount) {
            return 0.0;
        }
    };

    public abstract double count(double amount);

    public static void main(String[] args) {
        // 交易金额
        double amount = 500.0;
        // 计算不同游戏类型的手续费
        System.out.println(HandFeeCalculator.PC.count(amount));
 
        System.out.println(HandFeeCalculator.PAGE.count(amount));
 
        System.out.println(HandFeeCalculator.MOBILE.count(amount));
    }
 
}